<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

	<table>
		<tr>
			<td>课程</td><td>成绩</td>
		</tr>
		<c:forEach items="${students.grades}" var="c">
			<tr>
				<td>${c.course.courseName}</td>
				<td>
				   	<input type="text" onchange = "fun_1(this.value, ${c.id})" name="grade" class="form-control" placeholder="成绩" value="${c.grade }">
				</td>
			</tr>
		</c:forEach>
	</table>

<script type="text/javascript">
function fun_1(grade, id){
	$.post("updata1?grade="+grade+"&id="+id);
}
</script>
